{
 "cells": [
  {
   "cell_type": "code",
   "id": "initial_id",
   "metadata": {
    "collapsed": true,
    "ExecuteTime": {
     "end_time": "2025-11-17T08:16:16.264339Z",
     "start_time": "2025-11-17T08:16:16.243680Z"
    }
   },
   "source": [
    "import pandas as pd\n",
    "from pandas._libs.tslibs.offsets import Week, Hour\n",
    "import numpy as np\n",
    "date_off=Week(2)+Hour(10)\n",
    "pd.date_range('2023/1/1','2023/1/31', freq=date_off)"
   ],
   "outputs": [
    {
     "data": {
      "text/plain": [
       "DatetimeIndex(['2023-01-01 00:00:00', '2023-01-15 10:00:00',\n",
       "               '2023-01-29 20:00:00'],\n",
       "              dtype='datetime64[ns]', freq='346h')"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 3
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-11-17T09:12:20.751670Z",
     "start_time": "2025-11-17T09:12:20.747247Z"
    }
   },
   "cell_type": "code",
   "source": [
    "p=pd.period_range('2021/1/8','2021/1/31',freq='M')\n",
    "p\n",
    "s=['2021','2022','2023']\n",
    "pd.PeriodIndex(s,freq='Y-DEC')\n",
    "index=pd.date_range('2021/1/1',periods=30)\n",
    "import pandas as pd\n",
    "alarm=pd.read_csv('alarm.csv')\n",
    "alarm.head()\n",
    "alarm.info\n",
    "\n",
    "\n"
   ],
   "id": "4f3d8d6991a4dec9",
   "outputs": [],
   "execution_count": 18
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
